Check for function type instead of truthyness before calling