Added extra check to test if placeholder.element is a function.

This is associated with #71.