keyword?: Replace the if with an and

Instead of using an if branch to weed out non-keyword types, pull the
type check and the startswith into a simple and.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>