[python] How to check if an element of a list is a list (in Python)?