The location looks like common and its check to make sure its valid is duplicated on all the code. It'd be good if you can extract that into the base class or so