[PATCH 2/2] [python] fix wrong check for list instance