return null if param is undefined