Remove redundant empty object checks.