See previous comments about expecting functions but checking for undefined.