Fix: Possible null reference caused by missing return statement