Remove last element from array, if it is a function