You can just do if (delta) {...}, since empty strings are falsely.