improved empty check to allow using '0'