It's mostly a matter of preference, but you can use `==` for comparing enum's, which is null-safe. Or use `instanceof` for consistency, you're casting anyway.