Better value checking, in case value is 'nil'