@mishak87 You mean like this?
`if (!class_exists($factory) || !($reflection = Reflection\ClassType::from($factory) && $reflection->isInstantiable())) {`