public static boolean isRequired ( TypeDeclaration type ) { if ( type == null || type . required ( ) == null ) { return true ; } else { return type . required ( ) ; } }
Safely get required from a type with null checks