Remove unnecessary type checks

Optimized prematurely for the case that these functions would be used
directly by a user via an import.