Making url check more generic