Check for empty functions.

Fixes #7.