Check for null state before adding drawable to cache am: 7ba840071f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/layoutlib/+/16238916

Change-Id: Ifdcd7c8da521cf3b58a06b319753922b1592f2ad