Python Check If Array Or Stringent