Fixed JSHint giving warnings about comparing with nulls