Fix #485 - Check for null