Validate size config values to avoid crashes