I need to get the enum itself first by using RegoDocumentType.getByValue(createOrderRequest.getIdDocument().getIdType())
RegoDocumentType.getByValue(createOrderRequest.getIdDocument().getIdType())
Then check for null value, if it is