avoid NPE when name is null by having the literal value on the left site of "equalsIgnoreCase"