Simplified and optimised missing values check