That can be combine as one if( requiredProps == null || requiredProps.isEmpty() ) condition