The Top Dawg Entertainment artist was allegedly trespassing when police say they found a weapon in his vehicle