Update Post.java

update prevents from returning a NullPointerException