Added list type checking