Add null checks for *Buffer params

This change prevents crashes in native layers and throws an exception
instead.

Bug: 25695785
Test: CtsGraphicsTestCases
Change-Id: Ib6e6b7a09a86d8bc01a1c10ddd1af44f54d79ee8
4 files changed