Removeg magic number from ship model and useless null check