Javascript If Array Not Array In Python Interview