Check if post value exists before using