Use a real comparison with null. (null === getIdentifierCode()) : if your identifierCode is "0" or "false", (which is possible), your code will not work anymore.

On a more general note, do not use if on non-boolean expression.