WL-2499 Adds null check on available roles from server config

Previously this would have resulted in an NPE if no roles were defined in the config.