You should be able to do it with something like this, where you query for the Snapin but tell PowerShell not to error out if it cannot find it:
if ( (Get-PSSnapin -Name MySnapin -ErrorAction SilentlyContinue) -eq $null )
{
Add-PsSnapin MySnapin
}