Making sure a variable is array before checking values on it, fixes