Add support for checking generator objects and functions.