Null pointer check

Null Pointer Fix ...