Update getIdentifier function to support $id = 0

Update getIdentifier function to support $id = 0
Changed if clause to explicitly check for $id not being false.
Previously when $id is set to int 0 the getIdentifier function results
in returning false which is wrong. It should return the integer 0.