Check if method widget::is_preview exist