[BISERVER-8574] Fixed duplicate code within null check