Fix type hint check when callback has no type hint (courtesy of @cboden)