Added error checking in the js side before saving the lots

Reviewer: Tiff Go (Post commit)

Issue: 8733