Use callable function instead of hasattr(..., '__call__').