Add null checking and remove temporal test code for comparing mapping APIs