Membership, check for subscription type in template

Hi all, In my theme I have an if/else statement that checks whether a user is logged in or not and displays content accordingly...

<?php
if ( is_user_logged_in() ) { ?>
<p>you are logged in</p>
<? } else {
<p>you are not logged in</p>
}

I've recently integrated the membership plugin into the site and I'd like to tweak the above code to test for a subscription. Something like...

<?php
if ( USER HAS AN ACTIVE SUBSCRIPTION() ) { ?>
<p>your subscription is active</p>
<? } else {
<p>your subscription isn't active</p>
}

Is this possible? Or is there another way of achieving the same end?
thanks