Check parsed function signature type to ensure it's actually a function
type, otherwise throw a StuckException.
Fix #229, Fix #256