Php Check If Variable Is Array And List