CID-1254833 refactor condition to include null-case