Simplify fallback code by switching from if statement to test -z