add analog of rails 'present?' method