Fix TypeRegistry to return null for unknown types