Adding a null check and adding support for capital letters for some keywords