Best is to upgrade your 4 version to the latest 4 version before upgrading to version 5. Be aware that when upgrading to version 5 a lot of changes regarding the UI (layouts/snippets/theme) are being made. It could be that you need to go through your application and check everything to see if it functions the way you designed it in mendix 4.