I believe this can happen, if the someone pass a null value as the type argument of getConsole() function in ConsolesApi, or as you say if someone modifies the enum without updating here as well.