prepare release
NPE protection
protect against invalid data