Extract helper method flash_defined?