libion: add NULL checks

Check for NULL in any library function that takes a pointer.

Change-Id: I9ae8887b5ae0f231583173ee6a9dfd2f8c4611ec
1 file changed