rely less on typeof values for consistency