Added warning for beforeChange hook returning a function #1938