WASHINGTON — The Supreme Court agreed Thursday to take two cases involving allegedly improper searches by police, one of a rental car and another to get the license plate number on a stolen a motorcycle.

One case the court will consider comes from Pennsylvania and involves a man who drove a car rented by his girlfriend. The car’s rental agreement authorized Terrence Byrd’s girlfriend to drive the car, but his girlfriend gave him permission. Byrd was pulled over and says officers told him that because his name wasn’t on the rental agreement they could search the car without his permission. Inside they found heroin and a bulletproof vest.

Byrd argues that the search was improper, but an appeals court found he didn’t have any expectation of privacy because he wasn’t named on the rental agreement.

In the second case, a police officer walked into the driveway of a Virginia man’s home to inspect a motorcycle and then arrested the man after learning it was stolen.

Ryan Collins argues the officer improperly entered his private property uninvited and without a warrant. Lower courts said the Albemarle County officer who entered the driveway and pulled back a tarp covering the motorcycle in order to read the license plate acted lawfully.

Virginia’s Supreme Court said the case involved what the Supreme Court has called the “automobile exception,” which generally allows police to search a vehicle without a warrant if they believe the vehicle contains contraband. In a brief filed with the Supreme Court before he left office, former Virginia Solicitor General Stuart Raphael wrote that the automobile exception applies because police believed that the motorcycle was stolen and had twice been used to flee from police.