fix embedsOne error when embed instance is undefined or null

Signed-off-by: Clark Wang <clark.wangs@gmail.com>
Merge pull request #360 from clarkorz/fix/embedsOne-errors

fix embedsOne error when embed instance is undefined or null