Fixed #4677 (Message for 'possible null pointer dereference, otherwise it is redundant to check..' is warning but says error)