private Object legalOrIllegal(Metadata<Optional> metadata){
  Type type=metadata.getType();
  if (type.equals(String.class)) {
    return safetyCast.with("",type);
  }
  for (  Type numericType : SupportedTypes.NUMERIC) {
    if (type.equals(numericType)) {
      return safetyCast.with(0,type);
    }
  }
  return null;
}

private Object legalOrIllegal ( Metadata < Optional > metadata ) { Type type = metadata . getType ( ) ; if ( type . equals ( String . class ) ) { return safetyCast . with ( "" , type ) ; } for ( Type numericType : SupportedTypes . NUMERIC ) { if ( type . equals ( numericType ) ) { return safetyCast . with ( 0 , type ) ; } } return null ; }
return empty if type is string , 0 if it is a number , and otherwise return a null reference .
