Fixed checking for empty variable