Null pointer check patch