Added code to ignore null values