Changed value validation for specific types

Changed the way value is validated because TYPE_NULL and TYPE_NOT_NULL do not require a value to be present. The current validation breaks these types.