Javascript Detect Type Of Array In Python Syntax For If Else Statements