Simplify some optional logic.