Fixed calling empty() on functions