Some utility functions.

else isn't needed