code: public static boolean isRequired(TypeDeclaration type) {
  		if (type == null || type.required() == null) {
  			return true;
  		} else {
  			return type.required();
  		}
  	}
docs: Safely get required from a type with null checks
  
  @param type
  The RAML TypeDeclaration to check
  @return true if this parameter is required, false if optional