improved empty check to allow using '0'

follow-up to #585