TaskType (@Nullable String type) { if (type == null) { return TaskType.OTHER; } else if ("Bug".equals(type)) { return TaskType.BUG; } else if ("Exception".equals(type)) { return TaskType.EXCEPTION; } else if ("New Feature".equals(type)) { return TaskType.FEATURE; } else { return TaskType.OTHER; } }