Remove string comparisons for illegal ACL

We should use try/except syntax to try to get rid of
unnecessary string comparisons.

Change-Id: I8dcd902beb27911ea52f8721355a336ccb1b2206