Wrapping package definition in defined check

Prevents duplicate definition warning if mpm package defined previously.