Fixes a logic error in the managed object edit view controller
Moves assertion for readability improvements