Avoid ternary for handling corner cases