Fair enough, this is a bad practice. I've changed it to through an exception if the has algorithm is not supported.