Check if aoi is an sf or sp type object If sp, convert to sf and return
check_aoi(aoi)
aoi
the area of interest object