Checking for null values (not sure why this is needed...)