Added null checks to FileResourceModelSource