def get_as_type_or_null json_path, type, json=nil
      value = get json_path, json
      value.nil? ? value : get_as_type(json_path, type, json)
    end
def get_as_type_or_null json_path, type, json=nil
      value = get json_path, json
      value.nil? ? value : get_as_type(json_path, type, json)
    end
Retrieve value of the first JSON element with given JSON path as given type, with nil value allowed
 @param json_path [String] a valid JSON path expression
 @param type [String] required type, possible values are 'numeric', 'array', 'string', 'boolean', 'numeric_string'
 or 'object'
 @param json [String] optional JSON from which to apply JSON path, default to response body
 @return [Object] value of first retrieved JSON element in form of given type or nil
 @raise [Exception] if JSON path is invalid or no matching JSON element found or matching element does not match
 required type