Can I add my own if statement to node.tpl to test if field groups are null?
For example:


I created content type
In display settings for Full content display created group group_mygroup


If group elements are empty then group wil not be displaying. In this case you should check it:

//if node's group_mygroup does not exist
//in our case it means that all elements in group are empty
if(!isset($node-&gt;group_mygroup))
        print 'Group elements are empty';
print render($content);


As you can read in node template help part - block of comments:

 * Other variables:
 * - $node: Full node object. Contains data that may not be safe.


Now, what you can do to understand solution more clearly:


Install Devel module



  Helper functions for Drupal developers and inquisitive admins. This
  module can print a summary of all database queries for each page
  request at the bottom of each page. The summary includes how many
  times each query was executed on a page (shouldn't run same query
  multiple times), and how long each query took (short is good - use
  cache for complex queries).



Somwhere in your template's code use
dpm($node);
Create content of your type and see how it is displaying. You should see same picture

Click on header of appeared block and you can see structure of node object



If you want to check if some field doesnt exist - use same construction:

if(!isset($node-&gt;field_name))
print 'Field is empty';