Simplify code, avoid compiler warnings

I receive compiler warnings when building these files since these if statements don't have an `else` branch. This patch removes the last, superfluous comparison. Alternative, an explicit error could be raised when none of the if branches matches.