use null if param is undefined