Use const_defined? to check if key exists