remove hasValue method, please use `== null` instead