public static Object getObjectValue(Map<String, Object> yamlObject, String key, boolean allowsEmpty)
            throws YamlConvertException {
        if (yamlObject == null) {
            throw new NullPointerException();
        }
        Object obj = yamlObject.get(key);
        if (obj == null && !yamlObject.containsKey(key) && !allowsEmpty) {
            throw new YamlConvertException(String.format(MSG_KEY_NOT_FOUND, key));
        }
        return obj;
    }
public static Object getObjectValue ( Map < String , Object > yamlObject , String key , boolean allowsEmpty ) throws YamlConvertException { if ( yamlObject == null ) { throw new NullPointerException ( ) ; } Object obj = yamlObject . get ( key ) ; if ( obj == null && ! yamlObject . containsKey ( key ) && ! allowsEmpty ) { throw new YamlConvertException ( String . format ( MSG_KEY_NOT_FOUND , key ) ) ; } return obj ; }
(null may mean null value for the specified key)