Fixed parameter checking in the magic method