Cannot check for null if the object is null (“cannot read the property” error)

I just cannot figure out how to solve a simple situation: when my JSON data returns an object where one of its properties is null, I just cannot find a way how to check for it, because even in the checking itself, the exception is thrown:

var data=Template.currentData();  //here the RECORD property is an empty string, ""

if(!data.record)   //throws an error, cannot read null of 'record'

How can I perform the check when I cannot get it to read the property at all?