overload getTyped to accept defaultValue