checks for valid prime url