added token check to is_array