Fix retrieval functions to return null on 404