avoid calling function for check empty string