This is a strange if statement.. I don't think I've ever seen a parameter compared this way. Is there some reason for this? I'm surprised:

if ($params->get('contact')) doesn't work??