optimized condition for default handling in TextField