Add nil check in in_forward for future heartbeat improvement
heartbeat parameter changed to heartbeat_type