Wrapped flash in conditional as requested.  Also unset flash if there are no messages.