Fix two NPEs when decoding Drawables/Bitmaps

These arguments are not required in the real android implementations. Adding null checks and a test to ensure this behavior is preserved in Robolectric.