just using  role != nil && role == 'admin'  should work. No need to specify true and false.