You can use empty() here since it treats 0 as false as well.