Fully implement 2.3.3.3.1 part of spec.
Always check whether then is a function.