better written as is_array( $countriesArray ) here diretly