Fixed bug looking for 'NULL' strings rather than NA values