Use Massive collections to avoid null checks, convert to lower case and use quicker permission and flag checking.