Add checks for more conditions where brackets are misplaced
Checking for invalid keyword formatting