add falsey checks as suggested by @englercj