I expected that null is also one of the type of error. But if we use throw error, it will be more understandable during debug