tweaked operator precedence on table name check to catch input error cleaner