How to set missing serial number on MacBook Pro 2014
If your MacBook is not properly serialized it should be done by an Apple Authorised Service Provider. It is to be assumed that perhaps it was forgotten (or not properly done) after a repair.