how to check map is empty or null apex class code example Example: check map is empty in apex if (accountRecordTypes == null || accountRecordTypes.isEmpty()) {