Update head.php

The two foreach statements on $vars['metas'] and $vars['links'] produce a lot of logging because they are empty, so checking if they are empty before trying to run foreach makes good sense