Is it correct to return instead of throwing an exception ? (not sure as I'm not familiar with this part of the code)