PRIS-1111: Updated to make correct use of a null pointer check