Throw exception on wrong type in Language::isValidCode( $code )